package com.zjhcsoft.shop.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;

import com.zjhcsoft.shop.dao.UserDao;
import com.zjhcsoft.shop.model.User;
import com.zjhcsoft.shop.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	@Resource
	private UserDao userDao;
	//private static final Logger logger = Logger.getLogger(UserServiceImpl.class);
	private static final Log logger = LogFactory.getLog(UserServiceImpl.class);
	/* (non-Javadoc)
	 * @see com.zjhcsoft.shop.service.UserService#saveOrUpdate(com.zjhcsoft.shop.model.User)
	 */
	public void saveOrUpdate(User user){
		userDao.saveOrUpdate(user);
	}
	
	public User loadByLoginName(String loginName){
		return userDao.loadByLoginName(loginName);
	}
	
	public List<User> getUserByLoginName(String loginName){
		return userDao.getUserByLoginName(loginName);
	}
}
